package cn.usian.service.impl;


import cn.usian.dao.EmpDao;
import cn.usian.pojo.Emp;
import cn.usian.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpDao empDao;


    @Override
    public List<Emp> findAll() {
        return empDao.findAll();
    }

    @Override
    public void del(int id) {
        empDao.del(id);
    }

    @Override
    public void add(Emp emp) {
        empDao.add(emp);
    }

    @Override
    public Emp findById(int id) {
        return empDao.findById(id);
    }

    @Override
    public void update(Emp emp) {
        empDao.update(emp);
    }


}
